/**
 * (c) Elena Simona Apostol
 */

#ifndef MSG_LOGGER_H_
#define MSG_LOGGER_H_


// Debugging information 
#define DBG         4
// Informational messages
#define INFO        3
// Warning messages
#define WARN        2
// Errors
#define ERR         1

#define MSG_LOG(level, message) 											\
	do{ 																	\
		switch(level){														\
			case DBG:     	            		                       		\
				/* Bash Prompt Color = LIGHTGRAY */							\
				std::cerr << "\033[0;37m" __FILE__ "\t"      				\
				          << __LINE__                                      	\
				          << "\t"                                         	\
				          << message                                       	\
				          << std::endl                                     	\
				          << "\033[00m";                                  	\
				break;														\
			case INFO:			                            	            \
				/* Bash Prompt Color = LIGHTBLUE*/							\
				std::cerr << "\033[1;34m" __FILE__ "\t"     				\
				          << __LINE__                                      	\
				          << "\t"                                         	\
				          << message                                       	\
				          << std::endl                                     	\
				          << "\033[00m";                                   	\
				break;														\
			case WARN: 														\
				/* Bash Prompt Color = CYAN */								\
				std::cerr << "\033[0;36m" __FILE__ "\t"      				\
				          << __LINE__                                      	\
				          << "\t"                                         	\
				          << message                                       	\
				          << std::endl                                     	\
				          << "\033[00m";                                   	\
				break;													   	\
			case ERR:                               	        		  	\
				/* Bash Prompt Color = RED */								\
				std::cerr << "\033[0;31m" __FILE__ "\t"      			 	\
				          << __LINE__                                      	\
				          << "\t"                                         	\
				          << message                                       	\
				          << std::endl                                     	\
				          << "\033[00m";                                   	\
				break;														\
		}                                                                   \
	} while(0)
 
#endif /*MSG_LOGGER_H_*/

